<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>课件管理</title>
	<meta name="decorator" content="default"/>
	<!--装载文件-->
<%--<link href="/static/uploadify/default.css" rel="stylesheet" type="text/css" />  //上传任务窗口--%>
	<link href="${path}/static/uploadify/uploadify.css" rel="stylesheet" type="text/css"/>
	<%--<script type="text/javascript" src="${path}/static/uploadify/jquery-1.8.3.min.js"></script>--%>
	<script type="text/javascript" src="${path}/static/uploadify/swfobject.js"></script>
	<script type="text/javascript" src="${path}/static/uploadify/jquery.uploadify.js"></script>

	<script src="${path}/js/common/jquery.form.js"></script>

	<%--<script type="text/javascript" src="${path}/js/common/jquery.min.js"></script>--%>

	<!--ready事件-->
	<script type="text/javascript">
		$(function () {
            if (window.ActiveXObject) {
                var s = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
                if(!s){
                    alert('请将您的浏览器设置falsh插件在此网站上始终允许！');
                }
            } else {
                var s = navigator.plugins['Shockwave Flash'];
                if(!s){
                    alert('请将您的浏览器设置falsh插件在此网站上始终允许！');
                }
            }
			$("#coursewareDocumentUpload").click(function () {
//				alertx("点击");

				$.jBox($("#coursewareDocumentImportBox").html(), {
					title: "上传课件文档", buttons: {"关闭": true},
//					bottomText: "上传文件不能超过10M，仅允许上传“jar”格式文件！",
					loaded: function (e) {
						e.find(".btnImportSubmit").click(function () {
							if (e.find("#coursewareDocumentUploadFile").val() == "") {
								alertx("请选择课件文档上传");
								return false;
							}
							var s = window.parent.document.getElementById("documentMaskDIV");
							s.style.display = "block";
							e.find("#coursewareDocumentImportForm").ajaxSubmit({
								type: "POST",
								dataType: "json",
								url: "${ctx}/resource/resourceCourseware/coursewareDocumentUpload",
								success: function (json) {
									if (json.success == true) {
										var fileList = json.dataObj;
										$("#coursewareDocumentIds").val(fileList[0]);
										$("#coursewareDocumentUrl").val(fileList[1]);
										alertx("上传成功");
//                                        console.debug( e.parent().next().children("button"));
										e.parent().next().children("button").click();
										var s = window.parent.document.getElementById("documentMaskDIV");
										s.style.display = "none";
									}
									else {
										window.location.href = "${ctx}/resource/resourceCourseware/form";
										var s = window.parent.document.getElementById("documentMaskDIV");
										s.style.display = "none";
									}
								},
								error: function (XMLHttpRequest, textStatus, errorThrown) {
									alertx("上传失败");
									var s = window.parent.document.getElementById("documentMaskDIV");
									s.style.display = "none";
								}
							});

						})
					}

				});
			});
		});
		$(function () {
			$("#videoFileUpload").click(function () {
//				alertx("点击");

				$.jBox($("#importBox").html(), {
					title: "上传视频素材", buttons: {"关闭": true},
//					bottomText: "上传文件不能超过10M，仅允许上传“jar”格式文件！",
					loaded: function (e) {
						e.find(".btnImportSubmit").click(function () {

							if (e.find("#uploadFile").val() == "") {
								alertx("请选择视频素材上传");
								return false;
							}
							var s = window.parent.document.getElementById("videoMaskDIV");
							s.style.display = "block";
							e.find("#importForm").ajaxSubmit({
								type: "POST",
								dataType: "json",
								url: "${ctx}/resource/resourceCourseware/videoUpload",
								success: function (json) {

									if (json.success == true) {
										var fileList = json.dataObj;
										$("#videoFileIds").val(fileList[0]);
										$("#videoFileUrl").val(fileList[1]);
										alertx("上传成功");
//                                        console.debug( e.parent().next().children("button"));
										e.parent().next().children("button").click();
										var s = window.parent.document.getElementById("videoMaskDIV");
										s.style.display = "none";

									}
									else {
										var s = window.parent.document.getElementById("videoMaskDIV");
										s.style.display = "none";
										window.location.href = "${ctx}/resource/resourceCourseware/form";

									}
								},
								error: function (XMLHttpRequest, textStatus, errorThrown) {
									var s = window.parent.document.getElementById("videoMaskDIV");
									s.style.display = "none";
									alertx("上传失败");
								}
							});

						})
					}

				});
			});
		});

		var ary = new Array();
		var ary_video = new Array();
		$(document).ready(function() {
5
			$("#uploadify").uploadify({
				'swf': '${path}/static/uploadify/uploadify.swf',
				'uploader' : '${ctx}/resource/resourceCourseware/upload',//后台处理的请求
//        'buttonImage' :'/static/uploadify/uploadCancel.png',
				'buttonText' : '选 择 文 件',
				'fileObjName':'file',
				'fileSizeLimit':0,
				'queueID' : 'fileQueue',//与下面的id对应
				'queueSizeLimit' : 50,    //队列最大长度
				'uploadLimit' : 10,       //一次上传文件数量
				'fileTypeDesc' : '请上传word或pdf文件',
				'fileTypeExts' : '*.doc;*.docx;*.pdf;', //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
				'auto' : false,             //自动上传
				'multi' : true,              //多文件选择
				'checkExisting' :true,
				'removeTimeout'  :0.4,         //上传成功后到任务自动消失的时间
				'removeCompleted' :true,  //上传完成任务自动消失
				'requeueErrors' :true,
//        'onSelect' :function(file){
//            if(file.size<8000)
//            {
//                alert(file.name+"文件为空");
//
//            }
//        },
				'onUploadSuccess' :function(file,data,response){
					if(document.getElementById("fileIds").value!=''){
						ary = document.getElementById("fileIds").value.split(",");
					}
					if(date!='')
						ary.push(data);
					document.getElementById("fileIds").value=ary;    //把获取到的文件ID传值给html
					$.ajax({
						type : "POST",
						url : "${ctx}/resource/resourceCourseware/uploadFileList",
						data : {"ary" : ary},
						traditional: true,
						error:function(){
							alert("error");
						},
						success:function(json) {
							console.log(json);
							var tbody = window.document.getElementById("tbody-result");

							var fileList = json.dataObj;
							var str = "";
							for (var i = 0; i < fileList.length; i++) {
//								$("#contentTable").show();
								var file = fileList[i];
								if(file == '')
									continue;
								else
								{
									str += "<tr>" +
											"<td>" + file.name + "</td>" +
											"<td>" + file.url + "</td>" +
											"<td><a onclick=deleteFile(\""+ file.id + "\",this)>删除</a></td>" +
//                            "<td>"+"<a onclick=deleteFile(fileList[i].fileName)>"+"删除"+"</a>"+"</td>" +
											"</tr>";
								}
							}
							tbody.innerHTML = str;
						}
					});

				}
			});
		});
		$(document).ready(function() {

			$("#uploadify_video").uploadify({
				'swf': '${path}/static/uploadify/uploadify.swf',
				'uploader' : '${ctx}/resource/resourceCourseware/videoUpload',//后台处理的请求
//        'buttonImage' :'/static/uploadify/uploadCancel.png',
				'buttonText' : '选 择 文 件',
				'fileObjName':'file',
				'queueID' : 'videoFileQueue',//与下面的id对应
				'queueSizeLimit' : 50,    //队列最大长度
				'uploadLimit' : 1,       //一次上传文件数量
				'fileTypeDesc' : '请上传常用视频格式文件',
				'fileTypeExts' : '*.mp4;*.avi;*.flv;*.webm;*.f4v;*.m3u8;*.wmv;*.mpg;*.asf', //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
				'auto' : false,             //自动上传
				'multi' : false,              //多文件选择
				'checkExisting' :true,
				'removeTimeout'  :0.4,         //上传成功后到任务自动消失的时间
				'removeCompleted' :true,  //上传完成任务自动消失
				'requeueErrors' :true,
//        'onSelect' :function(file){
//            if(file.size<8000)
//            {
//                alert(file.name+"文件为空");
//
//            }
//        },
				'onUploadSuccess' :function(file,data,response){
					if(document.getElementById("videoFileIds").value!=''){
						ary_video = document.getElementById("videoFileIds").value.split(",");
					}
//					$("#videoContentTable").show();

					if(date!='')
						ary_video.push(data);


					document.getElementById("videoFileIds").value=ary_video;    //把获取到的文件ID传值给html
					$.ajax({
						type : "POST",
						url : "${ctx}/resource/resourceCourseware/videoFileList",
						data : {"ary" : ary_video},
						traditional: true,
						error:function(){
							alert("error");
						},
						success:function(json) {
							console.log(json);

							var tbody = window.document.getElementById("video-tbody-result");
							var fileList = json.dataObj;
							var str = "";
							for (var i = 0; i < fileList.length; i++) {
//								$("#videoContentTable").show();
								var file = fileList[i];
								if(file == '')
									continue;
								else
								{
									str += "<tr>" +
											"<td>" + file.fileName + "</td>" +
											"<td>" + file.ftpAddress + "</td>" +
											"<td><a onclick=deleteVideoFile(\""+ file.id + "\",this)>删除</a></td>" +
//                            "<td>"+"<a onclick=deleteFile(fileList[i].fileName)>"+"删除"+"</a>"+"</td>" +
											"</tr>";
								}
							}
							tbody.innerHTML = str;
						}
					});

				}
			});
		});

		function deleteFile(fileId,obj) {
			$.ajax({
				type : "POST",
				url : "${ctx}/resource/resourceCourseware/uploadFileDelete",
				data : {"uploadFileId" : fileId},
				traditional : true,
				success:function(json){
					if(json.success == true){
						$(obj).parent().parent().remove();
					}
					else{
						var failMsg = json.msg;
						alertx(failMsg);
					}
					var idsString = document.getElementById("fileIds").value;
//                var idsAry = new Array();
//                idsAry = idsString.split(",");
//                for(var i=0;i<idsAry.length;i++)
//                {
//                    if(idsAry[i]==fileId)
//                    {
//                        idsAry.splice(i,1);
//                        break;
//                    }
//                }
//                document.getElementById("fileIds").value=idsAry;
					ary_video = idsString.split(",");
					for(var i=0;i<ary_video.length;i++)
					{
						if(ary_video[i]==fileId)
						{
							ary_video.splice(i,1);
							break;
						}
					}
//					if(ary_video.length==0)
//					{
//						$("#contentTable").hide();
//
//					}
					document.getElementById("fileIds").value=ary_video;
				}
			})
		}
		function deleteVideoFile(fileId,obj) {
			$.ajax({
				type : "POST",
				url : "${ctx}/resource/resourceCourseware/uploadFileDelete",
				data : {"uploadFileId" : fileId},
				traditional : true,
				success:function(json){
					if(json.success == true){
						$(obj).parent().parent().remove();
//						$("#videoContentTable").hide();

					}
					else{
						var failMsg = json.msg;
						alertx(failMsg);
					}
					var idsString = document.getElementById("videoFileIds").value;
//                var idsAry = new Array();
//                idsAry = idsString.split(",");
//                for(var i=0;i<idsAry.length;i++)
//                {
//                    if(idsAry[i]==fileId)
//                    {
//                        idsAry.splice(i,1);
//                        break;
//                    }
//                }
//                document.getElementById("fileIds").value=idsAry;
					ary_video = idsString.split(",");
					for(var i=0;i<ary_video.length;i++)
					{
						if(ary_video[i]==fileId)
						{
							ary_video.splice(i,1);
							break;
						}
					}
//					var opt=$("#uploadify_video").data('uploadify');
//					opt.queueData.queueSize   -= 1;
//					opt.queueData.queueLength -= 1;
					alertx("清空");
					document.getElementById('BIGDraw').innerHTML = "";
					$('#BIGDraw').html("");
					$('#videoFileQueue').empty();
					document.getElementById("videoFileIds").value=ary_video;
				}
			})
		}
		function deleteEditVideoFile(fileId) {
			alertx(fileId);
			<%--$.ajax({--%>
			<%--type : "POST",--%>
			<%--url : "${ctx}/resource/resourceCourseware/uploadFileDelete",--%>
			<%--data : {"uploadFileId" : fileId},--%>
			<%--traditional : true,--%>
			<%--success:function(json){--%>
			<%----%>
			<%--document.getElementById("videoFileIds").value=ary_video;--%>
			<%--}--%>
			<%--});--%>
		}
		function judgeNull(){

			if(document.getElementById("fileIds").value!='')
			{
				return true;
			}
			else
			{
				alertx("请先选择文件！");
				return false;
			}

		}
	</script>

	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});

		function picCheck(selector) {

			var fileName = $(selector).val();

			if (fileName != null && fileName != "") {
				var fileExt = fileName.substr(fileName.lastIndexOf(".")).toLowerCase();
				var fileType1 = new Array(".mp4");
				var fileType2 = new Array(".rmvb");
				var fileType3 = new Array(".avi");
                var fileType4 = new Array(".flv");
                var fileType5 = new Array(".f4v");
                var fileType6 = new Array(".webm");
                var fileType7 = new Array(".m3u8");
                var fileType8 = new Array(".wmv");
                var fileType9 = new Array(".avi");
                var fileType10 = new Array(".mpg");
                var fileType11 = new Array(".asf");
				//lastIndexOf如果没有搜索到则返回为-1
				if ($.inArray(fileExt, fileType1) == -1 && $.inArray(fileExt, fileType2) == -1 && $.inArray(fileExt, fileType3) == -1
                    && $.inArray(fileExt, fileType4) == -1 && $.inArray(fileExt, fileType5) == -1 && $.inArray(fileExt, fileType6) == -1
                    && $.inArray(fileExt, fileType7) == -1 && $.inArray(fileExt, fileType8) == -1 && $.inArray(fileExt, fileType9) == -1
                    && $.inArray(fileExt, fileType10) == -1 && $.inArray(fileExt, fileType11) == -1) {
					var file = $(selector);
					file.after(file.clone().val(""));
					file.remove();
					alertx("视频格式不正确，只能是mp4、rmvb、avi、flv、f4v、webm、m3u8、wmv、avi、mpg格式");
				}

			}
		}
		function coursewareDocumentPicCheck(selector) {

			var fileName = $(selector).val();

			if (fileName != null && fileName != "") {
				var fileExt = fileName.substr(fileName.lastIndexOf(".")).toLowerCase();
				var fileType1 = new Array(".pdf");
				var fileType2 = new Array(".PDF");
				//lastIndexOf如果没有搜索到则返回为-1
				if ($.inArray(fileExt, fileType1) == -1 && $.inArray(fileExt, fileType2) == -1) {
					var file = $(selector);
					file.after(file.clone().val(""));
					file.remove();
					alertx("课件文档格式不正确，只能是PDF(pdf)格式");
				}

			}
		}

//		document.getElementById("idSelect").selectedIndex = 2;

		function checkValidate()
		{
			var coursewareDocument=document.getElementById("coursewareDocumentIds").value;
			if(coursewareDocument==null||coursewareDocument=="")
			{
				window.alertx("请上传课件文档！");
				return false;
			}

		}
	</script>





</head>


<body>

<div id="importBox" class="hide">
	<form id="importForm" name="importForm" enctype="multipart/form-data"
		  class="form-search" style="padding-left:20px;text-align:center;"><br/>
		<input id="uploadFile" name="uploadFile" type="file" style="width:330px" onchange="picCheck(this)"/><br/><br/>　　
		<button type="button" class="btn btn-primary btnImportSubmit"> 上 传</button>
	</form>
</div>

<div id="coursewareDocumentImportBox" class="hide">
	<form id="coursewareDocumentImportForm" name="coursewareDocumentImportForm" enctype="multipart/form-data"
		  class="form-search" style="padding-left:20px;text-align:center;"><br/>
		<input id="coursewareDocumentUploadFile" name="coursewareDocumentUploadFile" type="file" style="width:330px" onchange="coursewareDocumentPicCheck(this)"/><br/><br/>　　
		<button type="button" class="btn btn-primary btnImportSubmit"> 上 传</button>
	</form>
</div>
<ul class="nav nav-tabs">
	<li><a href="${ctx}/resource/resourceCourseware/">课件列表</a></li>
	<li class="active"><a href="${ctx}/resource/resourceCourseware/form?id=${resourceCourseware.id}">课件<shiro:hasPermission name="resource:resourceCourseware:edit">${not empty resourceCourseware.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="resource:resourceCourseware:edit">查看</shiro:lacksPermission></a></li>
</ul><br/>
<form:form id="inputForm" modelAttribute="resourceCourseware" action="${ctx}/resource/resourceCourseware/save" method="post" class="form-horizontal" enctype="multipart/form-data">
	<form:hidden path="id"/>
	<sys:message content="${message}"/>
	<div class="control-group">
		<label class="control-label">课件名称：</label>
		<div class="controls">
			<form:input path="coursewareName" htmlEscape="false" maxlength="64" class="input-xlarge required" />
			<span class="help-inline" ><font color="red">*</font> </span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">课件属性：</label>
		<div class="controls">
			<select id="coursewareAttribute" name="coursewareAttribute" class="input-xlarge required">
				<c:choose>
					<c:when test="${isSuperAdmin=='false'}">
						<option value="0" selected>${fns:getDictLabel("0",'resource_courseware_attribute',"无")}</option>
					</c:when>
					<c:otherwise>
						<c:forEach var="attribute" items="${fns:getDictList('resource_courseware_attribute')}">
							<option value="${fns:getDictValue(attribute,'resource_courseware_attribute',"")}" <c:if test="${fns:getDictValue(attribute,'resource_courseware_attribute','')==resourceCourseware.coursewareAttribute}">selected</c:if>>${attribute}</option>
						</c:forEach>
					</c:otherwise>
				</c:choose>

			</select>

			<span class="help-inline"><font color="red">*</font> </span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">标签：</label>
		<div class="controls">
			<form:input path="label" htmlEscape="false" maxlength="64" class="input-xlarge " />
		</div>
	</div>
	<%--<div class="control-group">--%>
	<%--<label class="control-label">视频素材：</label>--%>
	<%--<div class="controls">--%>
	<%--<file></file>--%>
	<%--<form:input path="videoMaterial" htmlEscape="false" maxlength="128" class="input-xlarge "/>--%>
	<%--</div>--%>
	<%--</div>--%>
	<%--<div class="control-group">--%>
		<%--<label class="control-label">视频素材:</label>--%>
		<%--<div class="controls">--%>
			<%--<input type="hidden" id="videoFileIds" name="videoFileIds" value="${videoFileIds}"/>--%>
			<%--<div class="control-group">--%>
				<%--<div class="controls">--%>
					<%--<div id="videoFileQueue"></div>--%>
					<%--<input type="file" name="uploadify_video" id="uploadify_video" />--%>
				<%--</div>--%>
				<%--<div class="controls">--%>
					<%--<p>--%>
						<%--<a href="javascript:jQuery('#uploadify_video').uploadify('upload','*')">开始上传</a>--%>
						<%--<a href="javascript:jQuery('#uploadify_video').uploadify('stop')">暂停所有上传</a>--%>
					<%--</p>--%>
				<%--</div>--%>
			<%--</div>--%>
			<%--<table id="videoContentTable" class="table table-striped table-bordered table-condensed">--%>
				<%--<thead>--%>
				<%--<tr>--%>
					<%--<th>上传成功文件列表</th>--%>
					<%--<th>文件路径</th>--%>
					<%--<th>操作</th>--%>
				<%--</tr>--%>
				<%--</thead>--%>
				<%--<tbody id="video-tbody-result">--%>
				<%--<c:forEach items="${videoMaterials}" var="videoMaterial">--%>
					<%--<tr>--%>
						<%--<td>--%>
								<%--${videoMaterial.fileName}--%>
						<%--</td>--%>
						<%--<td>--%>
								<%--${videoMaterial.ftpAddress}--%>

						<%--</td>--%>
						<%--<td>--%>
							<%--<a href="#" onclick="deleteVideoFile('${videoMaterial.id}',this)">删除</a>--%>
						<%--</td>--%>
					<%--</tr>--%>
				<%--</c:forEach>--%>
				<%--</tbody>--%>
			<%--</table>--%>
		<%--</div>--%>
			<%--<div class="controls">--%>


			<%--&lt;%&ndash;<input type="file" id="videoMaterialFile" name="videoMaterialFile" style="width:330px" onchange="picCheck(this)" />&ndash;%&gt;--%>
			<%--</div>--%>
	<%--</div>--%>
	<div class="control-group">
		<label class="control-label">关联实验环境：</label>
		<div class="controls">
			<select id="environmentId" name="environmentId" class="input-xlarge">
				<option value="" selected>====请选择====</option>
				<c:forEach items="${sceneEnvironmentList}" var="sceneEnvironment">
					<option value="${sceneEnvironment.id}" <c:if test="${sceneEnvironment.id==resourceCourseware.environmentId}"> selected</c:if>>${sceneEnvironment.environmentName}</option>
				</c:forEach>
			</select>
		</div>
	</div>

	<div class="control-group">
		<label class="control-label">是否要提交结果：</label>
		<div class="controls">
			<form:select path="submitResult" class="input-xlarge required">
				<form:options items="${fns:getDictList('resource_courseware_submit_result')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
			</form:select>
			<span class="help-inline"><font color="red">*</font> </span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">实验文档：</label>
		<div class="controls">
				<%--<textarea rows="4" type="text" id="experimentalDocument" name="experimentalDocument"></textarea>--%>
					<form:textarea htmlEscape="false" path="document" rows="4" id="document" maxlength="2000"
								   class="input-xxlarge"/>
			<sys:ckeditor replace="document" uploadPath="/itemDescribe" />
				<%--<form:textarea path="experimentalDocument" htmlEscape="false" rows="4" class="input-xxlarge " readonly="${not empty type?'true':'false'}"/>--%>
		</div>
	</div>

	<div class="control-group">
		<label class="control-label">文档素材：</label>
		<div class="controls">
			<input type="hidden" id="fileIds" name="fileIds" value="${fileIds}"/>
			<div class="control-group">
				<div class="controls">
					<div id="fileQueue"></div>
					<input type="file" name="uploadify" id="uploadify"  maxlength="256"/>
				</div>
				<div class="controls">
					<p>
						<a href="javascript:jQuery('#uploadify').uploadify('upload','*')">开始上传</a>
						<a href="javascript:jQuery('#uploadify').uploadify('stop')">暂停所有上传</a>
					</p>
				</div>
			</div>
			<table id="contentTable" class="table table-striped table-bordered table-condensed">
				<thead>
				<tr>
					<th>上传成功文件列表</th>
					<th>文件路径</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody id="tbody-result">
				<c:forEach items="${documentMaterials}" var="documentMaterial">
					<tr>
						<td>
								${documentMaterial.name}
						</td>
						<td>
								${documentMaterial.url}

						</td>
						<td>
							<a href="#" onclick="deleteVideoFile('${documentMaterial.id}',this)">删除</a>
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">课件文档：</label>
		<div class="controls">
			<input type="hidden" name="coursewareDocumentIds" id="coursewareDocumentIds" htmlEscape="false" maxlength="256" class="input-xlarge" readonly="true" value="${coursewareDocumentIds}"/>
			<input type="text" name="coursewareDocumentUrl" id="coursewareDocumentUrl" htmlEscape="false" maxlength="256" class="input-xlarge" value="${coursewareDocumentURL}" readonly="true"/>
			<input id="coursewareDocumentUpload" class="btn btn-primary" type="button" value="上传"/>
			<span class="help-inline" ><font color="red">*</font> </span>
		</div>


	</div>
	<div class="control-group">
		<label class="control-label">视频素材：</label>
		<div class="controls">
			<input type="hidden" name="videoFileIds" id="videoFileIds" htmlEscape="false" maxlength="256" class="input-xlarge" value="" readonly="true" value="${videoFileIds}"/>
			<input type="text" name="videoFileUrl" id="videoFileUrl" htmlEscape="false" maxlength="256" class="input-xlarge" value="${videoMaterialURL}" readonly="true"/>
			<input id="videoFileUpload" class="btn btn-primary" type="button" value="上传"/>
		</div>
	</div>
	<div class="form-actions">
		<c:if test="${ empty type}">
			<shiro:hasPermission name="resource:resourceCourseware:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" onclick=" return checkValidate()"/>&nbsp;</shiro:hasPermission>
		</c:if>
		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
	</div>
</form:form>
<script>
	var uploadUrl = "${ctx}/resource/resourceCourseware/Base64Upload";
	var path = "${path}";
</script>

<script src="${path}/js/common/Wordpaste.js"></script>

</body>
</html>